package com.itheima.health.properties;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * 权限认证配置类，可以对多个请求配置相应的权限需求
 * 路径为**，则为匹配所有请求
 * 路径为*，则匹配当前等级下的所有路径
 */
@Data
@Component
@ConfigurationProperties(prefix ="health.auth")
public class AuthorityProperties {

    private List<Authority> authorities;

    @Data
    public static class Authority{
        private String path;
        private String method;
        private String keyword;
    }

}

